/********************************************************************************
 * Copyright(c) 2020-2025 VINCENT_WY All rights reserved.
 * - Filename
 * - Author  Vincent
 * - Version V1.0.0
 * - Date    2023/09/21
 * - Brief
 * - FunctionList:
 ******************************************************************************
 * History:
 *
 *
 *
 ******************************************************************************
 */

#pragma once
#include <sys/time.h>
#include <sys/types.h>

#include <iostream>
#include <map>
#include <memory>
#include <string>
#include <vector>

struct FileInfo {
  int type;
  int freq;
  int width;
  int height;
  long long int timestamp;
  std::string imageName;
  std::string fileName;
};

class FileReader {
 public:
  FileReader(const int type, const std::string &root);
  ~FileReader();
  std::map<int, FileInfo> getFileInfoList();

 private:
  int _type;
  int _count;
  std::string _root{};
  std::map<int, FileInfo> _fileInfoMap;
  void getFrameInfo(const std::string &root, std::string name, FileInfo &frame);
};